package com.agileai.bpm.bizmoduler.emulation;

import java.util.List;

import com.agileai.domain.DataParam;
import com.agileai.domain.DataRow;
import com.agileai.hotweb.bizmoduler.core.QueryModelServiceImpl;

public class WfProcessHistoryListQueryImpl extends QueryModelServiceImpl 
	implements WfProcessHistoryListQuery {
	
	public WfProcessHistoryListQueryImpl(){
		super();
	}

	@Override
	public List<DataRow> findProcessRecords(DataParam param) {
		String statementId = sqlNameSpace+"."+"findProcessRecords";
		List<DataRow> result = this.daoHelper.queryRecords(statementId, param);
		return result;
	}
	public List<DataRow> findRecords(DataParam param) {
		String hisStyle = param.getString("HIS_STYLE");
		String statementId = null;
		if("HIS_PROCESS".equals(hisStyle)){
			statementId = sqlNameSpace+"."+"retrieveProcessHistory";
		}else{
			statementId = sqlNameSpace+"."+"retrieveActivityHistory";
		}
		List<DataRow> result = this.daoHelper.queryRecords(statementId, param);
		return result;
	}
}
